//控制比例大小
(function() {
	var b = document.documentElement,
		a = function() {
			var a = b.getBoundingClientRect().width;
			b.style.fontSize = 0.0625 * (750 <= a ? 750 : a) + "px"
		},
		c = null;
	window.addEventListener("resize", function() {
		clearTimeout(c);
		c = setTimeout(a, 300)
	});
	a()
})();
//滑动搜索出现背景
$(document).ready(function() {
	function navChangeArea(message, height) {
	    var liveDiv = $("#" + message).length ? $("#" + message) : $("." + message);
	    var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
	    if (scrollTop < height) {
	        liveDiv.removeClass('addbg');
	    } else {
	        liveDiv.addClass('addbg');
	    }
	}
	$(window).bind("scroll", function() {
	    navChangeArea("searchbox", 100);
	});
	$(window).bind("touchmove", function() {
	    navChangeArea("searchbox", 100);
	});
});